<template>
  <van-icon
    color="#777"
    :name="!value ? 'star' : 'star-o'"
    :style="!value ? 'color: red' : ''"
  />
</template>

<script>
export default {
  name: 'CollectionArticle',
  props: {
    // 接收父组件传递服务器是否已收藏布尔值
    value: {
      type: Boolean,
      required: true
    }
  }
}
</script>

<style scoped lang="less">
/deep/.collected.van-icon-star {
    color: #ffa500!important;
  }

</style>
